//
//  DetailViewController.m
//  老司机发车了
//
//  Created by 程成 on 16/8/6.
//  Copyright © 2016年 斌. All rights reserved.
//

#import "DetailViewController.h"

@interface DetailViewController ()
/*webView*/
@property (strong, nonatomic )UIWebView *webView;
/*backBtn*/
@property (strong, nonatomic )UIButton *backBtn;
@end

@implementation DetailViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationController.navigationBar.translucent = YES;
    self.webView = [[UIWebView alloc] initWithFrame:self.view.frame];

    NSString *urlString = [NSString stringWithFormat:@"%@%@",StoryDetailUrl,_docid];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
    [_webView loadRequest:request];
    [self.view addSubview:_webView];


    self.backBtn = [[UIButton alloc] initWithFrame:CGRectMake(20, self.view.frame.size.height-60, 30, 30)];
    [_backBtn setBackgroundImage:[UIImage imageNamed:@"back"] forState:(UIControlStateNormal)];
    [_backBtn addTarget:self action:@selector(backAction) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:_backBtn];

}

- (void)backAction{
    [self dismissViewControllerAnimated:YES completion:nil];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
